package com.example.demo_job.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data // 可以自动添加get和set方法
@AllArgsConstructor  // 全参构造方法
@NoArgsConstructor   // 空参构造方法
public class ComPosition {
    private int pid;
    private int cid;

    private  String cusername;
    private String cname;
    private String cpassword;
    private String cyear;
    private String caddress;
    private String cinfo;
    private String cemail;
    private String cphone;

    private String pname;
    private String pinfo;
    private double salary;
    private int hot;
    private String paddress;
    private int enumber;
    private int anumber;


    //跟用户有关
    private boolean flag=false;

    public ComPosition(Position position,Company company){
        this.pid=position.getPid();
        this.cid=company.getCid();
        this.cusername=company.getCusername();
        this.cname=company.getCname();
        this.cpassword=company.getCpassword();
        this.cyear=company.getCyear();
        this.caddress=company.getCaddress();
        this.cinfo=company.getCinfo();
        this.cemail=company.getCemail();
        this.cphone=company.getCphone();
        this.pname=position.getPname();
        this.pinfo=position.getPinfo();
        this.salary=position.getSalary();
        this.hot=position.getHot();
        this.paddress=position.getPaddress();
        this.enumber=position.getEnumber();
        this.anumber=position.getAnumber();
    }
}
